package com.sharemarking.system.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.sharemarking.system.serializer.ExceptionTypeSerializer;

/**
 * errCode规则：状态码(3位)，域代码(1位)，错误序号(2位)
 * @author song
 *
 */
@JsonSerialize(using=ExceptionTypeSerializer.class)
public enum ExceptionType{
	DUPLICATE_ID("400000","重复id"),
	DUPLICATE_USERNAME("400101","重复用户名"),
	DUPLICATE_MOBILE("400102","重复手机号");
	private String errCode;
	private String errMsg;
	private ExceptionType(String errCode,String errMsg){
		this.errCode=errCode;
		this.errMsg=errMsg;
	}
	public String getErrCode(){
		return errCode;
	}
	public String getErrMsg(){
		return errMsg;
	}
}
